#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int global = 1;

// 声明全局变量用于存储总分和人数
int totalScore = 0;
int totalStudents = 0;

double average(int score) {
    totalScore += score;
    totalStudents += 1;
    return (double)totalScore / totalStudents;
    // return totalScore / totalStudents; // 则返回的是int型强转的浮点数，会丢失精度
}

int main() {
    int arr[1024] = {0};
    int tmp, num = 0;
    for (int i = 0; i < sizeof(arr) / sizeof(arr[0]); i++) {
        scanf("%d", &tmp);
        if (tmp < 0){
            break;
        }
        arr[i] = tmp;
        ++num;
    }

    for (int i = 0; i < num; ++i){
        printf("%d\t%d\t", i + 1, arr[i]);
        printf("平均分 = %6.2f\n", average(arr[i]));
    }
    return 0;
}